#include <iostream>

using namespace std;

class Base
{
public:
    virtual void displayMessage() const
    {
        std::cout << "Base class message" << std::endl;
    }
};

class Derived : public Base
{
public:
    void displayMessage() const override final
    {
        std::cout << "Derived class message" << std::endl;
    }
};

// 下面的代码会导致编译错误
// class MoreDerived : public Derived
// {
// public:
//     void displayMessage() const override // 这里报错
//     {
//         std::cout << "MoreDerived class message" << std::endl;
//     }
// };

int main()
{

    return 0;
}